package com.fengxu.netty.dubborpc.consumer;

import com.fengxu.netty.dubborpc.HelloServer;
import com.fengxu.netty.dubborpc.netty.NettyClient;

// 消费者启动类
public class ClientConsumer {

    private static final String ProtocolHead = "#HelloServer#hello#";

    public static void main(String[] args) {
        NettyClient consumer = new NettyClient();
        HelloServer helloServer = (HelloServer) consumer.getBean(HelloServer.class, ProtocolHead);
        String res = helloServer.hello("你好");
        System.out.println("返回结果为:"+res);
    }
}
